package stream;

import java.util.stream.Stream;

public class StreamSort {
    public static void main(String[] args) {
        Stream<Integer> stream = Stream.of(22, 11, 5, 44, 55);
        Stream<Integer> sorted = stream.sorted((a, b) -> {
            return a - b;
        });
        sorted.forEach(System.out::println);
//        stream.sorted().forEach(System.out::println);
    }
}
